package com.burstly.lib.component.networkcomponent.burstly.html.mraid;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import com.burstly.lib.component.networkcomponent.burstly.html.CloseableContainer;
import com.burstly.lib.component.networkcomponent.burstly.html.ICloseControl;
import com.burstly.lib.component.networkcomponent.burstly.html.ScriptInterstitialOverlay;
import com.burstly.lib.util.LoggerExt;
import com.burstly.lib.util.ScreenOrientationManager;

public class MraidFullscreenOverlay extends ScriptInterstitialOverlay<MraidView>
{
  private static final LoggerExt LOG = LoggerExt.getInstance();
  private static final String TAG = MraidFullscreenOverlay.class.getSimpleName();

  public MraidFullscreenOverlay(MraidView paramMraidView)
  {
    super(paramMraidView);
    paramMraidView.setContentParent((ViewGroup)((Activity)paramMraidView.getContext()).getWindow().getDecorView());
  }

  protected View addChildToLayout(ViewGroup paramViewGroup, MraidView paramMraidView)
  {
    View localView = super.addChildToLayout(paramViewGroup, paramMraidView);
    if ((localView instanceof ICloseControl))
    {
      CloseableContainer localCloseableContainer = (CloseableContainer)localView;
      localCloseableContainer.setCloseClickListener(this);
      paramMraidView.setCloseButtonControl(localCloseableContainer);
      return localView;
    }
    LOG.logWarning(TAG, "Mraid interstitial view doesn't implement ICloseControl interface, so mraid creatives won't be able to hide/show defult close button if any.", new Object[0]);
    return localView;
  }

  public void onClick(View paramView)
  {
    super.onClick(paramView);
    new ScreenOrientationManager((Activity)((MraidView)getChildView()).getContext()).setOrientation(true);
    ((MraidView)getChildView()).close();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.component.networkcomponent.burstly.html.mraid.MraidFullscreenOverlay
 * JD-Core Version:    0.6.2
 */